import request from '@/utils/request'

// 获取登录验证码
export const getCaptcha = () => {
	return request({
	    url: `/captchaImage`,
	    method: 'get'
	})
}

// 登录
export const login = (data) => {
    return request({
        url: `/login`,
        method: 'post',
        data
    })
}

// 退出登录
export const logout = (token) => {
    return request({
        url: `/logout`,
        method: 'post',
        data: token
    })
}

// 获取用户信息
export const getUserInfo = () => {
    return request({
        url: `/getInfo`,
        method: 'get'
    })
}
